<template>
  <div class="page-wrap">
      <split-pane split="vertical" :min-percent='5' :max-percent='80' :default-percent='10' @resize="resize">
      <template slot="paneL">
        <div class="left-container">
              <el-button type="primary" @click="dialogTableVisible = true">
      open a Drag Dialog
    </el-button>
    <el-dialog v-el-drag-dialog :visible.sync="dialogTableVisible" title="Shipping address" @dragDialog="handleDrag">
      content
    </el-dialog>
        </div>
      </template>
      <template slot="paneR">
        <split-pane split="horizontal">
          <template slot="paneL">
            <div class="top-container" />
          </template>
          <template slot="paneR">
            <div class="bottom-container" />
          </template>
        </split-pane>
      </template>
    </split-pane>
  </div>
</template>
<script>
import splitPane from 'vue-splitpane'
import elDragDialog from '@/directive/el-drag-dialog' // base on element-ui
export default {
  components:{
    splitPane
  },
  directives: { elDragDialog },
  data() {
    return {
      dialogTableVisible:false
    }
  },
  methods: {
    resize() {
      console.log('resize')
    },
    handleDrag(){
      // this.$refs.select.blur()
    }
  }
}
</script>
<style lang="less" scoped>
  .page-wrap {
    width: 100%;
    position: relative;
    height: 100vh;

    .left-container {
      background-color: #F38181;
      height: 100%;
    }

    .right-container {
      background-color: #FCE38A;
      height: 200px;
    }

    .top-container {
      background-color: #FCE38A;
      width: 100%;
      height: 100%;
    }

    .bottom-container {
      width: 100%;
      background-color: #95E1D3;
      height: 100%;
    }
  }
</style>
